<template>
  <!-- 增加页面的缓存 -->
  <router-view v-slot="{ Component }">
    <keep-alive>
      <component :is="Component" />
    </keep-alive>
  </router-view>
  <h1>测试123456</h1>
</template>

<script setup lang="ts">
import { onMounted } from "vue";
const initStyle = () => {
  // setTheme("default");
  const themeName =
    localStorage.getItem("theme-moment-set-chengang") || "light";
  const theme = document.documentElement.setAttribute("data-theme", themeName);
  // setTheme(themeName || "default");
};

onMounted(() => {
  initStyle();
});
</script>

<style lang="less"></style>
